package com.onlinemeal.customer.po;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="customer")
public class Customer implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	@Id
	@Column(length=50,nullable=false)
	private String uid;      //用户的唯一标示（使用的UUID的方法，32位）
	@Column(length=50,nullable=false)
	private String username; //用户姓名
	@Column(length=50,nullable=false)
	private String password; //用户密码
	@Column(length=50,nullable=false)
	private String email;    //用户邮箱
	@Column(length=20,nullable=false)
	private String phone;    //用户电话
	@Column(length=50,nullable=false)
	private String code;     //用户邮箱验证码
	/**
	 * 对于用户当前的状态的分析
	 * state = 0；用户没有激活
	 * state = 1：用户已经激活
	 */
	@Column(length=2)
	private String state;    //用户当前的状态
	
	public Customer() {
		super();
	}
	public Customer(String uid, String username, String password, String email,
			String phone, String code, String state) {
		super();
		this.uid = uid;
		this.username = username;
		this.password = password;
		this.email = email;
		this.phone = phone;
		this.code = code;
		this.state = state;
	}
	public String getUid() {
		return uid;
	}
	public void setUid(String uid) {
		this.uid = uid;
	}
	public String getUsername() {
		return username;
	}
	public void setUsername(String username) {
		this.username = username;
	}
	public String getPassword() {
		return password;
	}
	public void setPassword(String password) {
		this.password = password;
	}
	public String getEmail() {
		return email;
	}
	public void setEmail(String email) {
		this.email = email;
	}
	
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getState() {
		return state;
	}
	public void setState(String state) {
		this.state = state;
	}
	public String getPhone() {
		return phone;
	}
	public void setPhone(String phone) {
		this.phone = phone;
	}
	@Override
	public String toString() {
		return "Customer [uid=" + uid + ", username=" + username
				+ ", password=" + password + ", email=" + email + ", code="
				+ code + ", state=" + state + "]";
	}
	
}
